import request from '@/utils/request';
// 获取所有房间
export const GetAllRoomList = (Params: getroom) =>
  request({
    url: `/admin/rooms/state/list?bid=${Params.b_id}&room_name=${Params.name}&room_type_id=${Params.Params}&status=${Params.id}`,
  });
export const getRoomTypeList = () =>
  request({
    url: '/admin/roomType/list',
  });
// 获取房间信息
export const GetRoomMsg = () =>
  request({
    url: '/admin/rooms/config/view',
  });

// 发卡成功调用接口
export const IssuingCheckin = (data: CardMSg) =>
  request({
    method: 'POST',
    url: '/admin/issuing/checkin',
    data,
  });
// 修改房态
export const ChangeRoomType = (data: ChangeRoomType) =>
  request({
    method: 'POST',
    url: '/admin/rooms/status',
    data,
  });
// 退房
export const CheckRoomcard = (data: string) =>
  request({
    method: 'PUT',
    url: `/admin/issuing/checkout/${data}`,
  });
// 当前房间的发卡信息
export const GetRoomUserMsg = (data: string) =>
  request({
    url: `/admin/issuing/room/${data}`,
  });
// 退卡前获取房间信息
export const CheckoutUserRoom = (data: string) =>
  request({
    url: `/admin/issuing/card/${data}`,
  });

// 退管理卡
export const checkoutAdminCard = (data: string) =>
  request({
    method: 'PUT',
    url: `/admin/logManageCard/checkout/${data}`,
  });
// 获取房间过期时间
export const GetRoomTimer = (data: string) =>
  request({
    url: `/admin/rooms/expire/${data}`,
  });
// 查询管理卡
export const GetAdminCard = (data: string) =>
  request({
    url: `/admin/logManageCard/card/${data}`,
  });

// 查询挂失卡信息
export const getLogLossCardCardNum = (cardNum: string | number) =>
  request({ url: `/admin/logLossCard/card/${cardNum}` });
// 获取楼栋
export const getBuildingsList = () =>
  request({
    url: '/admin/buildings/list'
  });


// 用户发卡 传入全部的记录
export const UsercheckinList = (data: CardMSg[]) =>
  request({
    method: 'POST',
    url: '/admin/issuing/checkinList',
    data:{
      list:data
    },
  });


// 用户发卡 传入全部的记录
export const DELOneUserCheck = (RID:string) =>
  request({
    method: 'DELETE',
    url: `/admin/issuing/del/checkin/${RID}`,
  });


// 用户发卡 传入全部的记录
export const UserLostCard = (ID:string) =>
  request({
    method: 'DELETE',
    url: `/admin/issuing/loss/checkin/${ID}`,
  });

  // 无卡退房
  export const NoCardcheckout = (roomID:string) =>
  request({
    method: 'DELETE',
    url: `/admin/issuing/noCard/checkout/${roomID}`,
  });

  //获取校时卡时间  {

  export const GetSetcardTimer = (data:any) =>
    request({
      url: `/admin/hour/card/now/${data}`,
    });


  export const lostRoomCard = (id:string) =>
  request({
    method:"POST",
    url: `/admin/card/room/loss/expire/${id} `,
  });

// 团队入住

export const TeamCheckin = (data:any) =>
  request({
    method: 'POST',
    url: '/admin/issuing/group/checkin',
    data,
  });


















  